package edu.ynu.se.xiecheng.achitectureclass.controller;


import edu.ynu.se.xiecheng.achitectureclass.service.SomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/token")
public class SomeController {

    private final SomeService someService;

    @Autowired
    public SomeController(SomeService someService) {
        this.someService = someService;
    }

    @GetMapping("/get-token")
    public String getToken() {
        return someService.useToken();
    }
}
